                Patent document 1: JP-H10-252546 A (corresponding to U.S. Pat. No. 6,243,630)        Patent document 2: JP-2006-293650 A        Patent document 3: JP-H11-159387 A        
A known electronic apparatus writes failure information of vehicles, learnt values of control parameters used for vehicle controls, etc. in a backup memory to thereby hold them.
Further, such an electronic apparatus for a vehicle has as a backup memory a volatile memory (so-called SRAM), which stores and holds the data by being constantly supplied with an electric power of a battery even when an accessory switch or ignition switch is in an OFF state.
Further, a backup memory includes a nonvolatile electrically data rewritable memory such as a flash memory or EEPROM. Incidentally, in case that the electronic apparatus writes a copy of data, which is stored in the temporary storage memory, in the backup memory, thereby backing up the data, if data for a backup target is written in the backup memory each time the data is written in the temporary storage memory, the electronic apparatus increases the processing load in the backup operation.
In addition, the number of times of data writing of the nonvolatile memory such as a flash memory and EEPROM has a physical limitation. Thus, the technique to perform data backup frequently using such a nonvolatile memory causes the life of the electronic apparatus to become short.
Accordingly, the backup operation to write the copy of data, which is stored in the temporary storage memory, in the backup memory is typically performed just each time the electronic apparatus performs a predetermined quantity operation (see Patent document 1) or just before the electronic apparatus shuts down.
In addition, in a conventional electronic apparatus for a vehicle, the backup operation of the learnt value is performed on condition that the travel distance of the vehicle (refer to Patent document 2) or the amount of the change of the learnt value (refer to Patent document 3) comes to be more than a threshold value.
Herein, the technology to perform data backup just before shutting down the electronic apparatus requires a configuration in which the ON state of the electronic apparatus is maintained at least for a while after an operation to turn OFF and then is shut down.
For example, in the case of the electronic apparatus for a vehicle, when the turn-off operation of the ignition switch or accessory switch of the vehicle is carried out, it is necessary to execute the backup operation and stop the electronic apparatus thereafter, thus requiring a corresponding relay circuit.
Providing such a relay circuit increases the manufacturing cost of the electronic apparatus by the cost corresponding to the relay circuit. Thus, there is a problem that the technique of backing up the data just before shutting down of the electronic apparatus increases the manufacturing cost. In addition, in the electronic apparatus for a vehicle, there is a problem that it is difficult for an economy car to have such a relay circuit, and the backup operation using the relay circuit cannot be realized because of the cost.
In addition, in such a technique, when the electronic apparatus is unintentionally shut down without passing through the regular procedure because of the trouble etc., there is a problem that the data stored in the temporary storage memory up to that time cannot be backed up.
Further, in the technique of executing the backup operation each time the electronic apparatus performs a predetermined quantity operation, when the amount of operation as the execution condition of the backup operation is decreased, the above problem in the processing load or life of the apparatus occurs. When the above amount of operation is increased, a problem that the data, which fails in the backup, increases in number. Such a problem similarly occurs in the technique of executing backup operation on condition that the travel distance of the vehicle comes to be more than a threshold value.
In addition, in a conventional technology of executing backup operation on condition that the amount of change of the learnt value or travel distance of the vehicle comes to be more than a threshold value, when the target of the backup operation is a learnt value, the backup operation may be efficiently performed to some extent. However, when the failure information of the vehicle is backed up, the same result cannot be necessarily obtained.
With respect to the control parameter concerning the vehicle control, the travel distance of the vehicle becomes longer so that the execution of the learning process increases more. The difference of the newest learnt value and the past learnt value, which is already backed up, becomes large as the travel distance of the vehicle becomes long. In other words, no great difference occurs between the newest learnt value and the past learnt value in the short travel distance even if the backup operation is not performed. Thus, no big problem occurs.
In contrast, there is a high possibility that the failure of the vehicle is detected at the failure diagnosis executed at the time of the activation or start-up of the internal combustion engine. Furthermore, the failure may occur suddenly in the other period. The occurrence or phenomenon of the failure cannot be predicted easily.
That is, the failure information of the vehicle which should be backed up is irregularly generated without being related with the travel distance. On the other hand, the failure information of the vehicle need not be necessarily backed up unless the failure occurs. The failure information of the vehicle has a different character from that of the learnt value, which need to be backed up repeatedly during the travel of the vehicle. Furthermore, the update of the learnt value is executed in high frequency; in contrast, the probability of occurrence of the failure is dramatically low.
Therefore, when the backup operation about the failure information is executed using the same technique as the conventional technology concerning the backup of the learnt value mentioned above, the backup operation cannot be executed at an appropriate time point. That is, the conventional technology cannot efficiently perform the backup operation while decreasing a possibility of missing in the backup with respect to the backup of the data, which is generated regardless of the travel distance or the amount of the operation load of the apparatus, thus posing a problem.